var status = 0;

function start() {
    status = -1;
    action(1, 0, 0)
}

function action(d, c, b) {
    if (status == 0 && d == 0) {
        im.dispose();
        return
    }(d == 1) ? status++ : status--;
    var a = -1;
    if (status <= a++) {
        im.dispose()
    } else {
        if (status === a++) {
            im.askMenu("你想干什么？\r\n #L0#领取500个#i4001832##t4001832##l\r\n #L1#使用#i2433960##t2433960##l\r\n #L2#使用#i2433961##t2433961##l", 4, 2080009)
        } else {
            if (status === a++) {
                im.gainItem(2439170, -1);
                if (b == 0) {
                    im.sendNormalTalk("这是500个#i4001832##t4001832#。", 4, 2080009, false, false);
                    im.gainItem(4001832, 500)
                } else {
                    if (b == 1) {
                        im.sendNormalTalk("这是#i2433960##t2433960#。", 4, 2080009, false, false);
                        im.gainItem(2433960, 1)
                    } else {
                        im.sendNormalTalk("这是#i2433961##t2433961#。", 4, 2080009, false, false);
                        im.gainItem(2433961, 1)
                    }
                }
            } else {
                if (status === a++) {
                    im.dispose()
                }
            }
        }
    }
};